<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>经纪人/中介机构入驻申请</title>
		<link rel="stylesheet" href="../css/settle.css" />
		<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	</head>
	<body>
		<!-- header顶部标语、登陆注册 -->
	<header>
		<div class="header-top">
			<div class="container">
				<div class="row">
					<div class="header-top-left">
						<div class="welcome-msg"><span>欢迎来到四川大学科技成果交易平台!</span></div>
					</div>
					<div class="header-top-right">
						<ul class="header-links">
							<li><a href="http://123.207.115.103:8100/index">首页</a></li>
							<li><a href="http://123.207.115.103:8100/about">关于</a></li>
                		</ul>
					</div>
				</div>
			</div>
		</div>
	</header>
	<div class="content">
		<div class="form">
			<p class="form-type">经纪人/中介机构入驻</p>
			<label>
				<span class="title">经纪人/中介机构名称:</span>
				<span class="field"><input type="text" id="name" name="name"></span>
			</label>
			<label>
				<span class="title">您的身份证号:</span>
				<span class="field"><input type="text" id="idNumber" name="idNumber"></span>
			</label>
			<label>
				<span class="title">联系方式:</span>
				<span class="field"><input type="text" id="contact" name="contact"></span>
			</label>
			<label>
				<span>擅长领域:</span><span>
					<select id="field" name="field">
						<option>请选择领域</option>
					</select>
					<select id="category" name="category">
						<option>请选择类别</option>
					</select>
				</span>
			</label>
			<label>
				<span class="title">自我介绍:</span>
				<span class="field"><textarea class="abstract" name="introduction" id="introduction"></textarea></span>
			</label>
			<label>
				<span class="title">个人照片:</span>
				<span class="field"><input type="file" id="photo" name="photo"></span>
			</label>
			<div class="to-settle">
				<button class="style-bottom" id="broker-apply">申请入驻</button>
			</div>
		</div>
	</div>
		<script type="text/javascript">
            $("#broker-apply").click(function () {
                console.log("#broker-apply click")
				var form=new FormData();
                form.append("name",$("#name").val());
                form.append("idNumber",$("#idNumber").val());
                form.append("contact",$("#contact").val());
				form.append("field",$("#field").val());
                form.append("category",$("#category").val());
                form.append("introduction",$("#introduction").val());
				form.append("photo",$("#photo")[0].files[0]);
                $.ajax({
                    type: 'post',
                    url:'brokerSettlePost',
                    data:form,
                    processData: false,
                    contentType: false,
                    success: function (data) {
                        alert(data);
                        setTimeout(function () {
                            location.href="http://123.207.115.103:8100/index";
                        },1000);
                    },
                    error: function () {
                    }
                });
            })
		</script>
	</body>
	<script src="js/settle.js"></script>
</html>
